package com.example.springbootlocal.service;

import com.example.springbootlocal.domain.Student;
import com.example.springbootlocal.utils.page.IPage;

import java.util.List;

/**
 * @author X.I.O
 * @title: StudentService
 * @projectName spring-boot-local
 * @description: TODO
 * @date 2021/11/9 16:18
 */
public interface StudentService {

    /**
     * 保存一个
     * @param student
     */
    public void saveStudent(Student student);

    /**
     * 存储多个
     * @param students
     */
    public void saveStudentList(List<Student> students);

    /**
     * 通过关键字搜索
     * @param keyword
     * @return
     */
    public List<Student> getStudentListByKeyWord(String keyword);

    /**
     * 分页查询
     * @param page
     * @param size
     * @return
     */
    public IPage<Student> getIPageController(Integer page,Integer size);

    /**
     * 根据id自增
     * @param student
     */
    public void autoNumSaveStudent(Student student);

    /**
     * 根据id删除
     * @param id
     */
    public void deleteById(Integer id);

    public void updateById(Student student);
}
